/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.park.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 安全管理体系资料
 *
 * @author pig
 * @date 2023-10-23 19:00:28
 */
@Data
@TableName("base_safe_manage_material")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "安全管理体系资料")
public class BaseSafeManageMaterialEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 资料类型
	*/
    @Schema(description="资料类型")
    private String materialType;

	/**
	* 资料名称
	*/
    @Schema(description="资料名称")

    private String materialName;

	/**
	* 资料编号
	*/
    @Schema(description="资料编号")
    private String materialCode;

	/**
	* 发布单位
	*/
    @Schema(description="发布单位")
    private String publishUnit;

	/**
	* 有效日期
	*/
    @Schema(description="有效日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

	/**
	* 失效日期
	*/
    @Schema(description="失效日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date ineffectiveDate;

	/**
	* 资料简述
	*/
    @Schema(description="资料简述")
    private String materialComment;

	/**
	* 资料备注
	*/
    @Schema(description="资料备注")
    private String remark;

	/**
	* 资料附件
	*/
    @Schema(description="资料附件")
    private String attachment;

	/**
	* 是否一张图展示
	*/
    @Schema(description="是否一张图展示")
    private Boolean showFlag;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	public String getOrgIdStr(){
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company,this.orgId);

	}
	public String getMaterialTypeStr(){
		return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.material_type,this.materialType);
	}

}
